package br.com.sovi.gwt.client.application;

public abstract class SingleAttributeListener implements AttributeListener {

	private String attr;

	public SingleAttributeListener(String attr) {
		super();
		this.attr = attr;
	}

	public abstract void added(Object value);

	public abstract void removed();

	@Override
	public void attributeAdded(String key, Object value) {
		if (attr.equals(key)) {
			added(value);
		}
	}

	@Override
	public void attributeRemoved(String key) {
		if (attr.equals(key)) {
			removed();
		}
	}

}
